#pragma once

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
    VV_LOG_TRACE,
    VV_LOG_DEBUG,
    VV_LOG_INFO,
    VV_LOG_WARN,
    VV_LOG_ERROR,
    VV_LOG_CRITICAL,
} VV_LOG_LEVEL;

typedef void* VVLOGHANDLE;

VVLOGHANDLE vv_log_create(const char* log_path, const char* log_module, VV_LOG_LEVEL level);
void vv_log_destroy(VVLOGHANDLE handle);
void vv_log_trace(VVLOGHANDLE handle, const char *fmt, ...);
void vv_log_debug(VVLOGHANDLE handle, const char *fmt, ...);
void vv_log_info(VVLOGHANDLE handle, const char *fmt, ...);
void vv_log_warn(VVLOGHANDLE handle, const char *fmt, ...);
void vv_log_error(VVLOGHANDLE handle, const char *fmt, ...);
void vv_log_critical(VVLOGHANDLE handle, const char *fmt, ...);
void vv_log_func(VVLOGHANDLE handle, VV_LOG_LEVEL level, const char *fmt, ...);

#ifdef __cplusplus
}
#endif
